#ifndef     __MVMAT_H__
#define     __MVMAT_H__

#include "apptypedef.h"
#include "sysarch.h"
#include "OpencvIfEnums.h"
#include "hi_type.h"
#include "hi_common.h"
#include "hi_type.h"
#include "hi_comm_vb.h"
#include "hi_comm_sys.h"
#include "hi_comm_venc.h"
#include "hi_comm_vi.h"
#include "hi_comm_vo.h"
//#include "hi_comm_group.h"
#include "hi_comm_region.h"
#include "mpi_vb.h"
#include "mpi_sys.h"
#include "mpi_venc.h"
#include "mpi_vi.h"
#include "mpi_vo.h"
#include "mpi_region.h"
#include "sample_comm.h"

#include <linux/fb.h>
#include "hifb.h"
#include "loadbmp.h"


#include "hi_tde_api.h"
#include "hi_tde_type.h"
#include "hi_tde_errcode.h"

#include <opencv2/core/core.hpp>
#include <opencv2/opencv.hpp>
#include <opencv2/core/mat.hpp>

using namespace cv;
using namespace std;


class CmvMat : public Mat
{
public:
	CmvMat();
    virtual ~CmvMat();

    u32 getPhyAddr(void);
    void *getVirtAddr(void);

    int createImage(Size size, int type);


protected:
    u32 m_u32PhyAddr;
    void *m_pVirtAddr;

    void* newMmz(u32 numBytes);
    void freeMmz();
};


#endif /* End of #ifndef __OPENCVIF_H__*/

